package com.xyy.saas.payment.service.impl;

import com.xyy.saas.payment.dao.mapper.ThirdUserInfoMapper;
import com.xyy.saas.payment.dao.model.ThirdUserInfo;
import com.xyy.saas.payment.service.ThirdUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class ThirdUserInfoServiceImpl implements ThirdUserInfoService {

    @Autowired
    private ThirdUserInfoMapper thirdUserInfoMapper;

    @Override
    public int createThirdUserInfo(ThirdUserInfo thirdUserInfo){
        return thirdUserInfoMapper.insertSelective(thirdUserInfo);
    }

    @Override
    public ThirdUserInfo getThirdUserInfoByThirdUserId(String thirdUserId){
        return thirdUserInfoMapper.getThirdUserInfoByThirdUserId(thirdUserId);
    }

    @Override
    public ThirdUserInfo getThirdUserInfoByUserId(String userId){
        return thirdUserInfoMapper.getThirdUserInfoByUserId(userId);
    }

    @Override
    public ThirdUserInfo getThirdUserInfoById(Long id){
        return thirdUserInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateThirdUserInfoByUserId(ThirdUserInfo thirdUserInfo){
        return thirdUserInfoMapper.updateThirdUserInfoByUserId(thirdUserInfo);
    }

    @Override
    public List<ThirdUserInfo> selectNotOpenedByCtime(Date beginTime, Date endTime){
        return thirdUserInfoMapper.selectNotOpenedByCtime(beginTime, endTime);
    }

    @Override
    public int updateByPrimaryKeySelective(ThirdUserInfo record) {
        return thirdUserInfoMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return thirdUserInfoMapper.deleteByPrimaryKey(id);
    }
}
